package com.example.order_system.service;

import com.example.order_system.mapper.DishMapper;
import com.example.order_system.model.Dish;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @description:
 * @author: chengbaiyi
 * @create: 2022-07-22 18:36
 */
@Service
public class DishService {
    @Autowired
    private DishMapper dishMapper;

    public int addDish(String name, BigDecimal price) {
        return dishMapper.addDish(name, price);
    }

    public List<Dish> dishList(Integer isdown) {
        return dishMapper.dishList(isdown);
    }

    public int del(Integer did) {
        return dishMapper.del(did);
    }

    public int down(Integer did, Integer isdown) {
        return dishMapper.down(did, isdown);
    }
}
